const app = getApp()
Page({
  data:{
    inpValue:"",
    worklist:app.globalData.list,
    finishedlist:[],
    undefinedlist:[]
  },
  inpbind(){},
  createWork(){
    if(!this.data.inpValue) return
    let arr = this.data.worklist
    arr.unshift({text:this.data.inpValue,isComplete : false,index:this.data.worklist.length})
    this.setData({inpValue:'',worklist:arr})
    app.globalData.list = this.data.worklist
    console.log(this.data.worklist)
  },
  isChange(){
    this.setData({worklist:app.globalData.list})
  },
  onShow(){
    this.setData({worklist:app.globalData.list})
  }
})